package com.zlc.common.common.constant;

public class WorkflowConstant {

    private WorkflowConstant(){}

    public static final String SYMBOL_QUOTATION_MARKS = ";";

    public static final String TO = "to";

    //节点ID
    public static final String NODE_ID = "nodeId";

    //节点编号
    public static final String NODE_NUM = "nodeNum";

    //节点名称
    public static final String NODE_NAME = "nodeName";

    //流程code
    public static final String PROCESS_CODE = "processCode";

    //流程名称
    public static final String PROCESS_NAME = "processName";


    public static final String AOP_KEY_WORD = "AOP_KEY_WORD";

    /**
     * 流程事件配置類型  流程事件PROCESS 节点事件NODE
     */
    public static final String TYPE_PROCESS = "PROCESS";
    public static final String TYPE_NODE = "NODE";

    /**
     * 流程实例状态
     */
    //草稿
    public static final String INSTANCE_STATUS_DRAFT = "DRAFT";
    //进行中
    public static final String INSTANCE_STATUS_PROCESSING = "PROCESSING";
    //已结束
    public static final String INSTANCE_STATUS_FINISH = "FINISH";
    //已终止
    public static final String INSTANCE_STATUS_TERMINATION = "TERMINATION";

    /**
     * 流程任务状态
     */
    //待处理
    public static final String TASK_STATUS_PROCESSING = "processing";
    //已处理
    public static final String TASK_STATUS_COMPLETE = "complete";

    /**
     * 任务处理类型
     */
    //提交
    public static final String TASK_OPERATE_TYPE_SUBMIT = "SUBMIT";
    //自动处理
    public static final String TASK_OPERATE_TYPE_AUTO_SUBMIT = "AUTO_SUBMIT";
    //退回
    public static final String TASK_OPERATE_TYPE_REJECT = "REJECT";
    //终止
    public static final String TASK_OPERATE_TYPE_TERMINATION = "TERMINATION";
    //备案
    public static final String TASK_OPERATE_TYPE_NODE = "NODE";

    /**
     * 流程事件操作类型 自动触发AUTO_EXEC 待阅READ_NODE
     */
    public static final String EVENT_OPERATE_TYPE_AUTO_EXEC = "AUTO_EXEC";
    public static final String EVENT_OPERATE_TYPE_READ_NODE = "READ_NODE";


    //单人审批
    public static final String APPROVE_TYPE_ONLY = "ONLY";
    //多人审批
    public static final String APPROVE_TYPE_MORE = "MORE";

    //单人审批方式 取列表第一个
    public static final String APPROVE_TYPE_ONLY_FIRST_ONE = "FIRST_ONE";
    //单人审批方式 手动选择
    public static final String APPROVE_TYPE_ONLY_SELECT = "SELECT";

    //多人审批方式 取所有人
    public static final String APPROVE_TYPE_MORE_ALL = "ALL";
    //多人审批方式 手动选择
    public static final String APPROVE_TYPE_MORE_SELECT = "SELECT";

    //处理人不存在时报错 ERROR
    public static final String NO_APPROVE_USER_ERROR = "ERROR";
    //处理人不存在时跳过 CONTINUE
    public static final String NO_APPROVE_USER_CONTINUE = "CONTINUE";

    //处理人和上一步骤相同时继续处理 HAND
    public static final String SAME_APPROVE_USER_HAND = "HAND";
    //处理人和上一步骤相同时跳过 CONTINUE
    public static final String SAME_APPROVE_USER_CONTINUE = "CONTINUE";


    //用户配置类型 发起者
    public static final String USER_TYPE_START = "START";
    //用户配置类型 账号
    public static final String USER_TYPE_ACCOUNT = "ACCOUNT";
    //用户配置类型 变量
    public static final String USER_TYPE_VARIABLE = "VARIABLE";


    //分支规则 全部走
    public static final String FORK_RULE_ALL = "ALL";
    //分支规则 手动选择一个分支
    public static final String FORK_RULE_ONE = "ONE";
    //分支规则 手动选择一个或多个分支
    public static final String FORK_RULE_ONE_MORE = "ONE_MORE";


    /**
     * 事件触发 PROCESS_TERMINATION|TASK_ARRIVE|TASK_END_|TASK_BE_REJECT|REJECT_NOW_TASK
     */
    //终止事件
    public static final String EVENT_PROCESS_TERMINATION = "PROCESS_TERMINATION";
    //当任务到达时
    public static final String EVENT_TASK_ARRIVE = "TASK_ARRIVE";
    //当任务结束时
    public static final String EVENT_TASK_END = "TASK_END";
    //当任务被退回时
    public static final String EVENT_TASK_BE_REJECT = "TASK_BE_REJECT";
    //退回当前任务时
    public static final String EVENT_REJECT_NOW_TASK = "REJECT_NOW_TASK";


    /**
     * 事件类型
     */
    //备案 传阅
    public static final String EVENT_TYPE_READ_NODE = "READ_NODE";
    //自动处理
    public static final String EVENT_TYPE_AUTO_EXEC = "AUTO_EXEC";


    /**
     * 事件接口类型
     */
    //HTTP
    public static final String INTER_TYPE_HTTP = "HTTP";
    //MQ
    public static final String INTER_TYPE_MQ = "MQ";
    //CODE
    public static final String INTER_TYPE_CODE = "CODE";

}
